package com.sky.mapper;

import com.github.pagehelper.Page;
import com.sky.annotation.AutoFill;
import com.sky.dto.SetmealPageQueryDTO;
import com.sky.entity.Category;
import com.sky.entity.Dish;
import com.sky.entity.Setmeal;
import com.sky.entity.SetmealDish;
import com.sky.enumeration.OperationType;
import com.sky.vo.SetmealVO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

@Mapper

public interface SeatMealMapper {
    Integer countByCategoryId(Long id);

    List<Long> getSeatmealIdsByDishIds(List<Long> ids);

    void update(Setmeal setmeal);

    List<Setmeal> list(Setmeal setmeal);

    Page<SetmealVO> page(SetmealPageQueryDTO setmealPageQueryDTO);

    @AutoFill(OperationType.INSERT)
    void insert(Setmeal setmeal);

    void insertBathFlavors(List<SetmealDish> setmealDishes);


    List<Dish> getSeatmealDish(Long id);


    SetmealVO getIdWithDish(Long id);

    void getById(Long setmealId);

    Setmeal getId(Long setmealId);

    Integer countByStatus(Map map);
}
